package com.kazimsoylu;

import java.awt.Component;

import javax.swing.DefaultListCellRenderer;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.ListCellRenderer;

import net.sf.jml.MsnContact;


public class ContactListRenderer extends DefaultListCellRenderer
{
	/**
	 * 
	 */
	private static final long serialVersionUID = -7098504730269688098L;

	public ContactListRenderer()
	{
	
	}

	@Override
	public Component getListCellRendererComponent(JList list, Object value, int index,
            boolean isSelected, boolean cellHasFocus) 
	{
		super.getListCellRendererComponent(list, value, index,
                isSelected, cellHasFocus);

		MsnContact contact = (MsnContact)value;	
		JLabel label = new JLabel( contact.getDisplayName() );	
		
		return label;
	}
}
